package com.bestcem.xm.ticket.constant;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.Map;

/**
 * 公共常量
 *
 * @author zq.ding <zq.ding@idiaoyan.com>
 * @version v1.0
 * @date 2021/9/2 17:20
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class CommonConstant {
    public static final Map<Integer, String> DATA_TYPE_MAP = new HashMap<>();

    static {
        // 工单生成日期
        DATA_TYPE_MAP.put(0, ColumnConstant.Ticket.CREATED_DT);
        // 跟进截止日期
        DATA_TYPE_MAP.put(1, ColumnConstant.Ticket.FOLLOW_DEADLINE);
        // 审核截止日期
        DATA_TYPE_MAP.put(2, ColumnConstant.Ticket.AUDIT_DEADLINE);
        // 工单关闭日期
        DATA_TYPE_MAP.put(5, ColumnConstant.Ticket.CLOSED_D_T);
        // 工单处理完成日期
        DATA_TYPE_MAP.put(6, ColumnConstant.Ticket.TICKET_FINISH_TIME);
        // 工单处理失败日期
        DATA_TYPE_MAP.put(7, ColumnConstant.Ticket.TICKET_FAILED_TIME);
    }

    /**
     * 选项总数
     */
    public static final int MAX_ROW_COUNT = 4000;

    /**
     * 最大选项字数 6
     */
    public static final int MAX_CHARACTER_LENGTH_SIX = 6;

    /**
     * 最大选项字数 10
     */
    public static final int MAX_CHARACTER_LENGTH_TEN = 10;

    /**
     * 最大选项字数 20
     */
    public static final int MAX_CHARACTER_LENGTH_TWENTY = 20;

    /**
     * 最大列表长度 10
     */
    public static final int MAX_LIST_SIZE_TEN = 10;


    /**
     * 每单一级选项的个数
     */
    public static final int MAX_ITEM_COUNT_PER_LEVEL = 300;
    /**
     * 最大层数
     */
    public static final int MAX_LEVEL_COUNT = 5;

    /**
     * 每单一级选项的个数，错误提示
     */
    public static final String MAX_ITEM_COUNT_PER_LEVEL_MSG = "每单一级选项不超过300项";

    /**
     * 请勿越级填写内容
     */
    public static final String DO_NOT_SKIP_CONTENT = "请勿越级填写内容";

    /**
     * mysql limit 1
     */
    public static final String LIMIT_ONE_SQL = "limit 1";

    /**
     * mysql limit sql
     */
    public static final String LIMIT_SQL = "limit %d, %d";

    /**
     * mysql like %s%s sql
     */
    public static final String LIKE_SQL = "%%s%";

    /**
     * 行动规则数量限制
     */
    public static long CONFIG_SIZE_LIMIT = 50L;

    /**
     * copySample
     */
    public static final String ORG_SRC_ID_NOT_NULL = "OrgSrcId不能为空！";
    public static final String ORG_DST_ID_NOT_NULL = "OrgDstId不能为空！";
    public static final String SEQ_LIST_NOT_NULL = "SeqList不能为空！";
}
